/*$(document).ready(function() {
    var __ArtiForm = $('#form_article_add');
    var __editForm = $('#form_modal_edit');
    $('#submit_form').click(function() {

        var objArtiForm = {
            __formName: $("#push_module", __ArtiForm),


            __formUrl: $('#push_address')

        }
        for (var i in objArtiForm) {

            if (objArtiForm[i].val() == '') {
                objArtiForm[i].css({
                    'border-color': 'red'
                });
                return false;
            } else {
                objArtiForm[i].css({
                    'border-color': '#e5e5e5'
                });
            }

        }

        $.ajax({
            type: "POST",
            url: "/Website/add",
            data: {
                "name": objArtiForm.__formName.val(),
                "url": objArtiForm.__formUrl.val()

            },
            success: function(data) {
                layer.alert(data.info, function() {
                    if (true === data.status) window.location = "/Website/list";
                });
            }
        });

    });

    $('.tableDelete').click(function() {
        var userId = $(this).parent('td').attr('item_id'),
            thisUrl = $(this).attr('href');
        //官网欢迎页   
        layer.confirm('确认删除', {
            btn: ['确认', '取消'] //按钮
        }, function(index) {

            $.ajax({
                type: "GET",
                url: thisUrl,
                async: true,
                data: {
                    //"id" : userId
                },
                success: function(data) {
                    layer.alert(data.info, function() {
                        if (true === data.status) window.location = "/Website/list";
                    });
                }
            });
            layer.close(index);
            return false;

        }, function(index) {
            layer.close(index);
        });
        return false;

    });



    $('.tableEdit').click(function(e) {
        var urlOld = $(this).attr('href'),
            urlArr = urlOld.split("/");
        urlId = urlArr[urlArr.length - 1];
        $(this).attr({
            'href': '#form_modal_edit',
            'data-toggle': 'modal',
            'data-target': '#form_modal_edit'
        });
        itemId = $(this).parent('td').attr('item_id');

        var __parent = $(this).parent('td').parent('tr.gradeX');
        objEditForm = {
            __formName: $("#pushModule", __editForm),

            __formUrl: $("#pushAddress", __editForm)

        };

        var tdTable = [];
        $('td', __parent).each(function() {
            tdTable.push($(this).text());
        });
        objEditForm.__formName.val(tdTable[0]);

        objEditForm.__formUrl.val(tdTable[1]);
        $('option', objEditForm.__formUrl).each(function() {
            if ($(this).data('id') == itemId) {
                $(this).attr('selected', true);
            }
        });
        $('option', objEditForm.__formName).each(function() {
            if ($(this).data('id') == itemId) {
                $(this).attr('selected', true);
            }
        });

    });


    $('#edit_form').click(function() {
        var objAuthForm = {
            __formName: $("#pushModule", __editForm),
            __formUrl: $("#pushAddress", __editForm)

        }
        for (var i in objAuthForm) {

            if (objAuthForm[i].val() == '') {
                objAuthForm[i].css({
                    'border-color': 'red'
                });
                return false;
            } else {
                objAuthForm[i].css({
                    'border-color': '#e5e5e5'
                });
            }
        }
        $.ajax({
            type: "POST",
            url: "/Website/edit/id/" + urlId,
            data: {
                "name": objAuthForm.__formName.val(),
                "url": 　objAuthForm.__formUrl.val()

            },
            success: function(data) {
                layer.alert(data.info, function() {
                    if (true === data.status) window.location = "/Website/list";
                });
            }
        });

    });



});*/